package itsm.isperp.framework.data.log;

import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

/**
 * 
 * 
 * @author lizx
 * @date 2013-1-6
 * @version V1.0
 */
@Component
@Aspect
public class DatalogAspect {

	@Pointcut("execution(* itsm.isperp.framework.data..*.*(..))")
	public void anyDatalog() {

		System.out.println("run");

	}

	@Before("anyDatalog() && @annotation(ddl)")
	public void doBeforeCheck(JoinPoint jp, DoDatalog ddl) {
		System.out.println("before");
	}

	@After("anyDatalog() && @annotation(ddl)")
	public void doAfterReturning(JoinPoint jp, DoDatalog ddl) {
		System.out.println("after");
	}

}
